package com.fingard.dsp.bank.reqrespobj.cashpool;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.cashpool.Detail.RetAtsCPAQCashPoolAccQryDetail;
import com.fingard.xml.XmlTextWriter;

public class RetAtsCPAQCashPoolAccQry extends RetAtsBase {
    //执行状态码 0标识成功,其他均为失败
    public String respCode = "";
    //执行结果描述信息
    public String respInfo = "";
    //客户编号
    public String customId = "";

    public RetAtsCPAQCashPoolAccQry(ReqRespHeader p_header){
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }

    public void writeDetail() {
        retXmlWriter.writeStartElement("DetailRecord");

        retXmlWriter.writeElementString("CustomId", this.customId);
        retXmlWriter.writeElementString("RespCode", this.respCode);
        retXmlWriter.writeElementString("RespInfo", this.respInfo);
    }

    public void writeDetailEnd(){
        retXmlWriter.writeEndElement();
    }

    public void writeAccInfo(RetAtsCPAQCashPoolAccQryDetail accInfoDetail) {
        retXmlWriter.writeStartElement("AccountInfo");
        retXmlWriter.writeElementString("AccountId", accInfoDetail.accountId);
        retXmlWriter.writeElementString("Account", accInfoDetail.account);
        retXmlWriter.writeElementString("AccName", accInfoDetail.accName);
        retXmlWriter.writeElementString("AccUserBal", accInfoDetail.accUserBal);
        retXmlWriter.writeElementString("AccBal", accInfoDetail.accBal);
        retXmlWriter.writeElementString("IsCmbc", accInfoDetail.isCmbc);
        retXmlWriter.writeElementString("CurCode", accInfoDetail.curCode);
        retXmlWriter.writeElementString("CurrencyName", accInfoDetail.currencyName);
        retXmlWriter.writeElementString("BankName", accInfoDetail.bankName);
        retXmlWriter.writeElementString("CountryName", accInfoDetail.countryName);
        retXmlWriter.writeElementString("AccountType", accInfoDetail.accountType);
        retXmlWriter.writeEndElement();
    }
}
